Creating relative paths using variables

The Content HTML iPart does not support the use of the ~/ (tilde slash) shortcut, often used to automatically build the correct paths when a control is rendered in different domains. However, four variables are available in this iPart that allow you to enter paths for links and resources that are automatically resolved to various folders in your website. The variable names are case-sensitive.

Note: Images do not render in Design mode because the variable is not transformed until the content record is published. 

■    [Website] – Resolves to the root of the website and contains the website name. For example, [Website]/Home.aspx resolves to http://mydomain/MBR/Home.aspx.

■    [~] and [Root] - Both variables resolve to the root of the website. For example [~]/Home.aspx resolves to http://mydomain/Home.aspx.

■    [Theme] - Resolves to the website’s theme folder. For example [Theme]/images/image.png resolves to http://mydomain/Main15/App_Themes/Aspen/images/image.png. This variable can be used to access theme resources such as images and CSS.

■    [iMIS] - Resolves to the iMIS directory of the website. For example, [iMIS]/ContactManagement/CreateAccount.aspx resolves to http://mydomain/Main15/iMIS/ContactManagement/CreateAccount.aspx.

■    [Common] - Resolves to the AsiCommon directory of the website. For example, [Common]/Controls/Shared/FormsAuthentication/Login.aspx resolves to http://mydomain/Main15/AsiCommon/Controls/Shared/FormsAuthentication/Login.aspx.